home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_6.lha
/
7_6
/
7_6_next.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
485b
|
30 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Get the next entry from a list,
/ moving curr forward.
nt dlist::next(ent &a)
if (!last)
return 0;
// move curr forward, possibly to
// the beginning or end of the list.
if (curr)
if (curr == last)
{
curr = 0;
return 0;
}
else
curr = curr->next;
else
curr = last->next;
a = curr->e;
return 1;